set output=#path#name-ocr-t
#newl "#ppthapps\+\gs\bin\gswin32c.exe" |--convert pdf to tiff--
-r2400 |-r300 |--resolution. Higher resolution is used with downscalling.--
#remark PDF pages to process. Default setting is to process all pages|-dFirstPage=1 -dLastPage=3 |--Choose first and last page.--
-dTextAlphaBits=4 -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -dDownScaleFactor=8 -sDEVICE=tiffscaled8 -sCompression=pack -o "%output%-out.tif"  "#item" |--more settings--
#newl "#ppthapps\+\Tesseract-ocr\tesseract.exe" |-ocr program file-
"%output%-out.tif" |--ocr input file--
-l srp |-l eng |-l src |--choose language--
"%output%" |--output--
#remark disable page segmenation|-psm 6 |--Use this if lines go missing--
#newl del "%output%-out.tif" |--del temp file--
#newl "#ppthapps\txt2rtf-clvb\txt2rtf-clvb.exe" |-convert txt file to rtf-
-stFileIn="%output%.txt" |-temp file in-
-stFileOut="%output%.rtf" |-file out-
-stFontFamily="Times New Roman" -siFontSize=12 |-stFontFamily="Arial" -siFontSize=12 |
#newl del "%output%.txt" |-del temp file-


<comment>
Convert PDF to text using OCR (Optical character recognition).
Uses Tesseract ocr: http://code.google.com/p/tesseract-ocr/
Uses ghostscript: http://www.ghostscript.com/
Output file is in rtf format.
File is first converted from pdf to tiff.


-psm 6 = Assume a single uniform block of text.
